ScriptableStuffItEngine
Copyright
© 1998 Apple Computer, Inc. All Rights
Reserved.
by Pete Gontier, Developer Technical
Support
|
What is
this?
- It's a tool for scripting the StuffIt
Engine™, a library distributed by Aladdin
Systems, Inc. as part of their StuffIt®
family of products, which are the de facto
standard for data compression under Mac OS. (This is not
an endorsement.)
- It's also a C code sample which shows how easy it is
to make a scriptable application for a specific use. It
doesn't use the object model and it doesn't have a huge
feature set. (Its functionality fills a specific need in
Developer Relations, namely aiding an AppleScript
called SeedBuilder to make uniform seed archives and
segments.) This is a drawback in at least one sense, but
also an advantage in another in that it may demystify
scriptable applications for some number of developers by
exposing scripting support in terms they already
understand.
OK, so is it a tool
or a sample?
It's both a dessert topping and a floor wax.
(If you don't get this joke, you're not old or you don't
watch U.S. TV. In either case: congratulations!)
Heaven knows where this package will end up on the Tool
Chest CD.
Aren't many StuffIt
products already scriptable?
Yep. However, the scripting support in the various stock
applications was not quite what I needed for SeedBuilder.
Plus, I had to write "real" (C) code to support some of the
other things ('prepare filename for UNIX') already. In
truth, I sort of got carried away on the StuffIt support,
even though it isn't exhaustive.
How do I use
it?
Depends on what you want it to be.
- If you want to use it as a tool, fire up Script
Editor or your favorite AppleScript development tool and
have a look at the dictionary. You'll notice two suites:
one which exposes the StuffIt Engine via AppleScript and
one which does some miscellaneous things we needed around
the house. Standard dogma suggests I should sit here and
write a ton of documentation in addition to referring you
to the scripting dictionary, but that will have to wait
for another time. (Sorry, Cal and Sal!)
- If you're more interested in the sample code role of
this package, then here are the details on the
environment I used to build it:
- I installed Metrowerks
CodeWarrior Pro 2.
- I threw out the contents of the Mac OS Support
folder.
- I dropped Universal
Headers 3.2 into the Mac OS Support folder.
- I pulled additional files off the CodeWarrior CD
as needed (compiler and linker errors were a good
hint) and dropped them into the Mac OS Support
folder.
- I copied parts of MoreFiles
into the project (duplicated in this package for your
convenience).
- I put part of the StuffIt
Engine package in the access paths of the project.
(Not included as part of this package because I was
too busy/lazy [you choose] to work out the
licensing. If anybody at Aladdin wants to make this
painless, drop me a note.)
Legalisms
You may incorporate this Apple sample source code into
your program(s) without restriction. This Apple sample
source code has been provided "AS IS" and the responsibility
for its operation is yours. You are not permitted to
redistribute this Apple sample source code as "Apple sample
source code" after having made changes. If you're going to
re-distribute the source, we require that you make it clear
in the source that the code was descended from Apple sample
source code, but that you've made changes.
StuffIt® and StuffIt Engine™ are registered
trademarks of Aladdin Systems, Inc. This program is in no
way associated with Aladdin Systems, Inc. For questions or
concerns, contact Apple
Developer Technical Support.
Various CodeWarrior-related names mentioned herein are
trademarks of Metrowerks, Inc.
MoreFiles is probably not a trademark, and even if it
were, Jim would forgive me.
Version
History
1.0
|
initial public release
|
|